import vue from '@vitejs/plugin-vue';
import eslintPlugin from 'vite-plugin-eslint';
import createCompression from './plugins/compression';
import UnoCSS from 'unocss/vite';

export default function createVitePlugins(isBuild = false) {
	const vitePlugins = [];
	vitePlugins.push(vue());
	vitePlugins.push(UnoCSS());
	if (isBuild) {
		vitePlugins.push(eslintPlugin());
		vitePlugins.push(...createCompression());
	}
	return vitePlugins;
}
